package flatlandRPGTest;

import flatlandRPG.GameText;
import student.*;

// -------------------------------------------------------------------------
/**
 * Tests the GameText class.
 *
 * @author evant
 * @version Apr 24, 2011
 */
public class GameTextTest
    extends TestCase
{
    private GameText testText;


    public void setUp()
    {
        testText = new GameText(100);
    }


    // ----------------------------------------------------------
    /**
     * Test displaying a short string of text.
     */
    public void testSetText()
    {
        testText.setFormatedText("Short string");

        assertEquals(testText.getText(), "Short string");
    }

    // ----------------------------------------------------------
    /**
     * Tests that setting the same text twice works as expected.
     */
    public void testSameText()
    {
        testText.setFormatedText("Short string");
        testText.setFormatedText("Short string");

        assertEquals(testText.getText(), "Short string");
    }
}
